Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger improvements #325

Merged
merged 8 commits into from
Jan 10, 2025
Merged

Debugger improvements #325

merged 8 commits into from
Jan 10, 2025

Conversation

ivojawer
Copy link
Contributor

@ivojawer ivojawer commented Dec 28, 2024

Este PR tiene dos cambios principales

  1. La funcion interprete ahora acepta un frame que actua como el contexto para interpretar la linea (esto es importante para el debugger). Si no defaultea al repl, como hacia antes.
  2. Ahora el nodo REPL se genera siempre para evitar incosistencias.
    • Haciendo esto se cambio el setup de muchos tests, para que en vez de generar un nodo REPL con el contenido, se cree un package aparte y se lo registre como REPL

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.76%. Comparing base (59c43f7) to head (8093b50).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
+ Coverage   89.69%   89.76%   +0.06%     
==========================================
  Files          28       28              
  Lines        3183     3184       +1     
  Branches      579      581       +2     
==========================================
+ Hits         2855     2858       +3     
+ Misses        172      171       -1     
+ Partials      156      155       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ivojawer ivojawer requested review from fdodino and PalumboN and removed request for fdodino December 29, 2024 01:57
Copy link
Contributor

@fdodino fdodino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excelente! Te dejé unas preguntas

package.json Outdated Show resolved Hide resolved
return failureResult(`Unknown reference ${unlinkedNode.name}`)
} else return failureResult(`Unknown reference at ${unlinkedNode.sourceInfo}`)
}

const result = interpreter.exec(sentenceOrImport)
const result = frame ?
interpreter.do(function () { return interpreter.evaluation.exec(sentenceOrImport, frame) }) :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me llamó la atención ver el function ahí en lugar de la lambda

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tiene ningun motivo de ser 😅 , en esta situacion creo que no hay diferencia entre usar lambdas o funciones anonimas.

src/validator/en.json Outdated Show resolved Hide resolved
src/validator/es.json Outdated Show resolved Hide resolved
executionDirector.resume()
const { error, result } = interprete(new Interpreter(directedInterpreter.evaluation), 'energia', directedInterpreter.evaluation.currentFrame)
expect(error).to.be.undefined
expect(result).to.equal('100')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼 👏🏼 👏🏼

test/interpreter.test.ts Outdated Show resolved Hide resolved
test/interpreter.test.ts Outdated Show resolved Hide resolved
test/interpreter.test.ts Outdated Show resolved Hide resolved
src/linker.ts Show resolved Hide resolved
src/interpreter/interpreter.ts Show resolved Hide resolved
Copy link
Contributor

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dale que vaaaaa 💯 🥇 ATR PRrito malvado 🐕

src/interpreter/interpreter.ts Show resolved Hide resolved
src/interpreter/interpreter.ts Show resolved Hide resolved
src/linker.ts Show resolved Hide resolved
@PalumboN PalumboN merged commit 8c08698 into master Jan 10, 2025
4 checks passed
@PalumboN PalumboN deleted the debugger-improvements branch January 10, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants